<html>
<head>
  <title>Бомбила. Список заказов</title>
  <script type="text/javascript" src="/static/js/prototype-1.6.0.2.js"></script>
  <script type="text/javascript">
      function showOffers(orderId) {
          new Ajax.Updater('driverOffersDiv', '/getDriversOffers', {
            method: 'get',
            parameters: { orderId: orderId }
          });
      }
  </script>
</head>
<body>
<a href="/profile">Профиль</a>
<table>
<tr>
<td width="60%">
    <table>
        <tr>
            <th>Заказ #</th>
            <th>Содержание</th>
            <th>Дата</th>
            <th>Предложения</th>
        </tr>
    {% for order in orders %}
        <tr>
            <td>{{order.key.id}}</td>
            <td>{{order.content|escape}}</td>
            <td>{{order.date|date:"d.m.Y H:i:s"}}</td>
            <td><a href="javascript:showOffers('{{order.key.id}}')" title="Показать предложения">Показать</a></td>
        </tr>
    {% endfor %}
    </table>
    <form action="/createOrder" method="post">
        <textarea rows="5" cols="25" name="content" ></textarea><br />
        <input type="submit" value="send" />
    </form>
</td>
 <td>
    <div id="driverOffersDiv">
    </div>
 </td>
 </tr>
</table>
</body>
</html>